package com.itheima.课件.charstream.mycharstream;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class Test01 {
    public static void main(String[] args) throws IOException {
        //1. 创建输入流对象
        FileReader fr = new FileReader("day13_字符流&properties\\a.txt");
        BufferedReader br = new BufferedReader(fr);

        //2. 一次从文件中读取一整行的数据到内存,并将读到的内容输出打印
        String line;    //定义一个变量,用来接收每次读取到的内容

        while ((line = br.readLine()) != null){
            System.out.println(line);
        }

        //3. 关流,释放资源
        br.close();
    }
}
